package com.booking.dao.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.booking.dao.entity.ServiceInfo;
import com.booking.dao.mapper.ServiceInfoMapper;
import com.booking.dao.service.ServiceInfoService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Qikai.Lin
 * @date 2023/4/23
 */
@Service
public class ServiceInfoServiceImpl extends ServiceImpl<ServiceInfoMapper, ServiceInfo>
        implements ServiceInfoService {
    @Override
    public List<ServiceInfo> getByHomestayId(Long homestayId) {
        QueryWrapper<ServiceInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("homestay_id", homestayId);
        return this.baseMapper.selectList(queryWrapper);
    }
}
